package org.example.myleet.learn;

public class StopWatch {

    private long startTimeStamp;

    public StopWatch() {
        startTimeStamp = System.currentTimeMillis();
    }

    public void printTimeElapse(String tag) {
        long currentMillis = System.currentTimeMillis();
        long elapsed = currentMillis - startTimeStamp;
        startTimeStamp = currentMillis;
        System.out.printf("%s. Time elapsed %dms from last check point.\n", tag, elapsed);
    }
}
